<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>第一个vue项目</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        window.onload = function () {
            var app = new Vue({
                //定义变量el和data
                el: '.box',
                data: {
                    content: 'hello vue',
                    linkdata: '百度',
                    url: 'http://www.baidu.com',
                    count: 0
                },
                methods: {
                    fnAddClick: function () {
                        this.count += 1;
                    }
                }
            })
        }
    </script>
</head>
<body>

<div class="box">
    <div>{{content}}</div>
    <a v-bind:href="url" target="">{{linkdata}}</a>
    <a :href="url" target="">{{linkdata}}</a>
    <button @click="fnAddClick">{{count}}</button>
</div>

</body>
</html>